package it.polimi.traveldream.persistence.dtos;

import java.util.Calendar;
import java.util.Date;

public class PrenotazioneHotelDTO {
	
		private int ID;
	
		private int IDPrenotazione;
		
		private Date checkIN;
		
		private Date checkOUT;
		
		private int numeroPersone;
		
		private HotelProdDTO hotel;
		
		private GiftListHotelDTO giftList;
		
		private boolean salvata=true;
		
		
		public int getID() {
			return ID;
		}

		public void setID(int setID) {
			this.ID = setID;
		}

		public void setIDPrenotazione(int prenota){
			this.IDPrenotazione=prenota;
		}
		
		public int getIDPrenotazione(){
			return IDPrenotazione;
		}
		
		public void setCheckIN(Date checkin){
			this.checkIN=checkin;
		}
		
		public Date getCheckIN(){
			return checkIN;
		}
		
		public String getStringCheckIN(){
			Calendar cal=Calendar.getInstance();
			cal.setTime(checkIN);
			
			Integer day= cal.get(Calendar.DAY_OF_MONTH);
			Integer month= cal.get(Calendar.MONTH)+1;
			Integer year=  cal.get(Calendar.YEAR);
			return day.toString() + "/" + month.toString() + "/" + year.toString();
		}
		
		public void setCheckOUT(Date checkout){
			this.checkOUT=checkout;
		}
		
		public Date getCheckOUT(){
			return checkOUT;
		}
		
		public String  getStringCheckOUT(){
			Calendar cal=Calendar.getInstance();
			cal.setTime(checkOUT);
			
			Integer day= cal.get(Calendar.DAY_OF_MONTH);
			Integer month= cal.get(Calendar.MONTH)+1;
			Integer year=  cal.get(Calendar.YEAR);
			return day.toString() + "/" + month.toString() + "/" + year.toString();
		}
		
		public void setNumeroPersone(int num){
			this.numeroPersone=num;
		}
		
		public int getNumeroPersone(){
			return numeroPersone;
		}
		
		public void setHotel(HotelProdDTO h){
			this.hotel=h;
		}
		
		public HotelProdDTO getHotel(){
			return hotel;
		}

		public GiftListHotelDTO getGiftList() {
			return giftList;
		}

		public void setGiftList(GiftListHotelDTO giftList) {
			this.giftList = giftList;
		}

		public boolean isSalvata() {
			return salvata;
		}

		public void setSalvata(boolean salvata) {
			this.salvata = salvata;
		}
		
		
		
}
